Optimal. Leaf size=67 \[ \frac {(b c-a d)^2}{2 a b^2 \left (a+b x^2\right )}+\frac {c^2 \log (x)}{a^2}-\frac {1}{2} \left (\frac {c^2}{a^2}-\frac {d^2}{b^2}\right ) \log \left (a+b x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {457, 90}
\begin {gather*} -\frac {1}{2} \left (\frac {c^2}{a^2}-\frac {d^2}{b^2}\right ) \log \left (a+b x^2\right )+\frac {c^2 \log (x)}{a^2}+\frac {(b c-a d)^2}{2 a b^2 \left (a+b x^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 457
Rubi steps
\begin {align*} \int \frac {\left (c+d x^2\right )^2}{x \left (a+b x^2\right )^2} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {(c+d x)^2}{x (a+b x)^2} \, dx,x,x^2\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \left (\frac {c^2}{a^2 x}-\frac {(-b c+a d)^2}{a b (a+b x)^2}+\frac {-b^2 c^2+a^2 d^2}{a^2 b (a+b x)}\right ) \, dx,x,x^2\right )\\ &=\frac {(b c-a d)^2}{2 a b^2 \left (a+b x^2\right )}+\frac {c^2 \log (x)}{a^2}-\frac {1}{2} \left (\frac {c^2}{a^2}-\frac {d^2}{b^2}\right ) \log \left (a+b x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 70, normalized size = 1.04 \begin {gather*} \frac {2 c^2 \log (x)+\frac {(-b c+a d) \left (a (-b c+a d)+(b c+a d) \left (a+b x^2\right ) \log \left (a+b x^2\right )\right )}{b^2 \left (a+b x^2\right )}}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 66, normalized size = 0.99
method | result | size |
default | \(\frac {\left (a d -b c \right ) \left (\frac {\left (a d +b c \right ) \ln \left (b \,x^{2}+a \right )}{b^{2}}+\frac {a \left (a d -b c \right )}{b^{2} \left (b \,x^{2}+a \right )}\right )}{2 a^{2}}+\frac {c^{2} \ln \left (x \right )}{a^{2}}\) | \(66\) |
norman | \(\frac {a^{2} d^{2}-2 a b c d +b^{2} c^{2}}{2 a \,b^{2} \left (b \,x^{2}+a \right )}+\frac {c^{2} \ln \left (x \right )}{a^{2}}+\frac {\left (a^{2} d^{2}-b^{2} c^{2}\right ) \ln \left (b \,x^{2}+a \right )}{2 a^{2} b^{2}}\) | \(81\) |
risch | \(\frac {a \,d^{2}}{2 b^{2} \left (b \,x^{2}+a \right )}-\frac {c d}{b \left (b \,x^{2}+a \right )}+\frac {c^{2}}{2 a \left (b \,x^{2}+a \right )}+\frac {c^{2} \ln \left (x \right )}{a^{2}}+\frac {\ln \left (-b \,x^{2}-a \right ) d^{2}}{2 b^{2}}-\frac {\ln \left (-b \,x^{2}-a \right ) c^{2}}{2 a^{2}}\) | \(100\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 86, normalized size = 1.28 \begin {gather*} \frac {c^{2} \log \left (x^{2}\right )}{2 \, a^{2}} + \frac {b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}}{2 \, {\left (a b^{3} x^{2} + a^{2} b^{2}\right )}} - \frac {{\left (b^{2} c^{2} - a^{2} d^{2}\right )} \log \left (b x^{2} + a\right )}{2 \, a^{2} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.08, size = 117, normalized size = 1.75 \begin {gather*} \frac {a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2} - {\left (a b^{2} c^{2} - a^{3} d^{2} + {\left (b^{3} c^{2} - a^{2} b d^{2}\right )} x^{2}\right )} \log \left (b x^{2} + a\right ) + 2 \, {\left (b^{3} c^{2} x^{2} + a b^{2} c^{2}\right )} \log \left (x\right )}{2 \, {\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.69, size = 80, normalized size = 1.19 \begin {gather*} \frac {a^{2} d^{2} - 2 a b c d + b^{2} c^{2}}{2 a^{2} b^{2} + 2 a b^{3} x^{2}} + \frac {c^{2} \log {\left (x \right )}}{a^{2}} + \frac {\left (a d - b c\right ) \left (a d + b c\right ) \log {\left (\frac {a}{b} + x^{2} \right )}}{2 a^{2} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.95, size = 99, normalized size = 1.48 \begin {gather*} \frac {c^{2} \log \left (x^{2}\right )}{2 \, a^{2}} - \frac {{\left (b^{2} c^{2} - a^{2} d^{2}\right )} \log \left ({\left | b x^{2} + a \right |}\right )}{2 \, a^{2} b^{2}} + \frac {b^{2} c^{2} x^{2} - a^{2} d^{2} x^{2} + 2 \, a b c^{2} - 2 \, a^{2} c d}{2 \, {\left (b x^{2} + a\right )} a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.14, size = 80, normalized size = 1.19 \begin {gather*} \frac {c^2\,\ln \left (x\right )}{a^2}+\frac {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}{2\,a\,b^2\,\left (b\,x^2+a\right )}+\frac {\ln \left (b\,x^2+a\right )\,\left (a^2\,d^2-b^2\,c^2\right )}{2\,a^2\,b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________